package com.woniu.client;

import com.github.pagehelper.PageInfo;
import com.woniu.client.dto.UserAddress;
import com.woniu.config.FeignConfig;
import com.woniu.dto.UserDto;
import com.woniu.form.AddPointForm;
import com.woniu.form.SelUserForm;
import com.woniu.zsd.commons.core.model.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;


@FeignClient(name = "zsd-user",configuration = FeignConfig.class)
public interface UserClient {
    @GetMapping("/userInfo/selUser")
    public Result<PageInfo<UserDto>> selUserById(@ApiParam(name = "suf", value = "用户查询表单") SelUserForm suf);

    @GetMapping("/user-info/selUserInfoByIds")
    public Result<List<UserDto>> selUserInfoByIds(@RequestParam(value = "userIds") Set<Integer> userIds);

    @PutMapping("/user-info/addPointById")
    public Result addPointById(@RequestBody AddPointForm apf);

    @GetMapping("/user-address/selUserAddressById")
    public Result<UserAddress>  selUserAddressById(@RequestParam("id") String id);
}
